package com.pig4cloud.pig.village.welfare.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.pig.village.api.dto.WelfareRuleDTO;
import com.pig4cloud.pig.village.api.entity.RewardEvent;
import com.pig4cloud.pig.village.api.entity.WelfareRule;
import com.pig4cloud.pig.village.api.request.WelfareRuleSearch;

import java.util.List;

/**
 * @author limbray.li
 * @date 2021/6/19
 */
public interface IWelfareRuleService extends IService<WelfareRule> {
	IPage<WelfareRuleDTO> pageBySearch(Page page, WelfareRuleSearch search);

	List<WelfareRule> listByWelfareId(Long welfareId, Integer raise, Integer timeDimension);

	Boolean updateRulesById(Long id);

	@Deprecated
	Boolean updateRulesById(String rules, Long id,Long welfareId);

	List<WelfareRule> getAllRules();
	List<WelfareRule> getMonthRules();
	List<WelfareRule> getYearRules();
	List<WelfareRule> getBirthDayRules();
	List<WelfareRule> getSchoolRules();

	List<RewardEvent> eventConvert(List<WelfareRule> rules,String scheduleCode,Integer timeDimension);
}
